package com.springboot.chapter2;
import com.springboot.chapter2.utils.ResponseData;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
@RestControllerAdvice
public class AllExceptionHandler {
	@ExceptionHandler(ArrayIndexOutOfBoundsException.class)
	public ResponseData exception(ArrayIndexOutOfBoundsException e){
		return new ResponseData("500","数组越界",false,null);
	}
}
